<?php

class System_m extends CI_Model {
    function get_system_all() {
        $result=$this->db->get('zwop_systemmanager')->result_array();
        if ( is_array($result) && count($result) > 0 ) {
            return $result;
        }
        return false;
    }
    function get_system_detail($system_name="") {
        $result=$this->db->get_where('zwop_systemmanager',array('system_name'=>$system_name))->row_array();
        if( $result) {
            return $result;
        }
        return false;
    }
    function get_ip_passwd($system_ip="") {
        $result=$this->db->get_where('zwop_passwdmanager',array('ip'=>$system_ip))->row_array();
        if( $result ) {
            return $result;
        }
        return false;
    }
    function get_device_detail($system_ip="") {
        $result=$this->db->get_where('zwop_ipmanager',array('device_ip'=>$system_ip))->row_array();
        if( $result ) {
            return $result;
        }
        return false;
    }
}
